package com.ymatou.iapi.sellerproduct.parameter;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class ProdTplBean implements Serializable{
	
	private static final long serialVersionUID = -8834559347461591191L;  
	
	private int templateId=0;
	private int templateType=0;
	private int templateSellerId=0;
	private String templateName="";
	private String templateDesc="";
	private List<String> picUrls = new ArrayList<>();
	private boolean isDelete = false;
	
	
	
	public boolean isDelete() {
		return isDelete;
	}
	public void setDelete(boolean isDelete) {
		this.isDelete = isDelete;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	public int getTemplateId() {
		return templateId;
	}
	public void setTemplateId(int templateId) {
		this.templateId = templateId;
	}
	public int getTemplateType() {
		return templateType;
	}
	public void setTemplateType(int templateType) {
		this.templateType = templateType;
	}
	public int getTemplateSellerId() {
		return templateSellerId;
	}
	public void setTemplateSellerId(int templateSellerId) {
		this.templateSellerId = templateSellerId;
	}
	public String getTemplateName() {
		return templateName;
	}
	public void setTemplateName(String templateName) {
		this.templateName = templateName;
	}
	public String getTemplateDesc() {
		return templateDesc;
	}
	public void setTemplateDesc(String templateDesc) {
		this.templateDesc = templateDesc;
	}
	public List<String> getPicUrls() {
		return picUrls;
	}
	public void setPicUrls(List<String> picUrls) {
		this.picUrls = picUrls;
	}
	
	
	 public Object deepCopy() throws Exception  
	    {  
	        // 将该对象序列化成流,因为写在流里的是对象的一个拷贝，而原对象仍然存在于JVM里面。所以利用这个特性可以实现对象的深拷贝  
	        ByteArrayOutputStream bos = new ByteArrayOutputStream();  
	  
	        ObjectOutputStream oos = new ObjectOutputStream(bos);  
	  
	        oos.writeObject(this);  
	  
	        // 将流序列化成对象  
	        ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());  
	  
	        ObjectInputStream ois = new ObjectInputStream(bis);  
	  
	        return ois.readObject();  
	    }  

	
	
	
}
